import 'package:getx_demo_2/base/base_controller.dart';
import 'package:getx_demo_2/entity/test_entity_entity.dart';
import 'package:getx_demo_2/http/net_work.dart';
import 'state.dart';

class LoginLogic extends BaseController {
  final LoginState state = LoginState();

  void getData() {
    NetWorkManager.instance.getTasks(0).then((it) {
      check(it, (p0) {
        state.data.value = TestEntityData.fromJson(p0);
        state.data.refresh();
      });
    });
  }
}
